/*
 * Copyright (c) 2024. Shanghai HEADING information Engineering Co., Ltd. All rights reserved.
 */
package com.lovely602.design.study.basic;

/**
 * == 数值类型比较的是值
 * <p>
 * == 引用类型比较的是对象的内存地址
 * <p>
 * -128 - 127  之间的值 自动装箱不会new新的对象
 *
 * @author lizhixing
 */
public class IntegerTest {

  public static void main(String[] args) {
    Integer a1 = 127;
    Integer a2 = 127;
    System.out.println("a1 == a2：" + (a1 == a2));
    Integer b1 = 128;
    Integer b2 = 128;
    System.out.println("b1 == b2：" + (b1 == b2));
    int c1 = 128;
    int c2 = 128;
    System.out.println("c1 == c2：" + (c1 == c2));
  }
}
